package model;

import java.io.Serializable;


public class Item implements Serializable {
	private static final long serialVersionUID = 1L;
	private int id;
	private int productid;
	private String name;
	private String description;
	private String imageurl;
	private String imagethumburl;
	private double price;

	public Item() {
	}

	public Item(int id, int productid, String name, String description,
			double price) {
		this.id = id;
		this.productid = productid;
		this.name = name;
		this.description = description;
		this.price = price;
	}

	public int getItemid() {
		return id;
	}

	public void setid(int itemid) {
		this.id = itemid;
	}

	public int getProductid() {
		return productid;
	}

	public void setProductid(int productid) {
		this.productid = productid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getImageurl() {
		return imageurl;
	}

	public void setImageurl(String imageurl) {
		this.imageurl = imageurl;
	}

	public String getImagethumburl() {
		return imagethumburl;
	}

	public void setImagethumburl(String imagethumburl) {
		this.imagethumburl = imagethumburl;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	@Override
	public int hashCode() {
		return id;
	}

	@Override
	public boolean equals(Object object) {
		if (!(object instanceof Item)) {
			return false;
		}
		Item other = (Item) object;
		return other.id == id;
	}

	@Override
	public String toString() {
		return "model.Item[itemid=" + id + "]";
	}

}
